package be.hikage.sfeir;

import be.hikage.sfeir.annotation.Growl;
import be.hikage.sfeir.annotation.Log;

import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InterceptorBinding;
import javax.interceptor.InvocationContext;

/**
 * @author Gildas Cuisinier (hikage@hikage.be)
 *         User: hikage
 *         Date: 23/03/11
 */

@Interceptor
@Log
public class NotifierInterceptor {



    @AroundInvoke
    public void invoke(InvocationContext context) throws Exception {

            long beforeTime = System.currentTimeMillis();
            //context.proceed();
            long afterTime = System.currentTimeMillis();

        System.out.println("Call duration :" + (afterTime-beforeTime) + " ms" );

    }
}
